package com.fishery.client;

import com.fishery.entity.Result;
import com.fishery.handler.BaseServiceFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * 养殖模块的远程调用服务
 *
 * @author Ghost
 * @since 2021-1-30
 */
@FeignClient(value = "fishery-base-service", fallback = BaseServiceFallback.class)
public interface BaseClient {


	/**
	 * 获取基地的创建信息
	 *
	 * @param baseId
	 * @return
	 */
	@GetMapping("/base/{baseId}")
	public Result getBaseInfo(@PathVariable(name = "baseId", required = true) String baseId);

	/**
	 * 获取池塘的总个数、总面积
	 *
	 * @param baseId
	 * @return
	 */
	@GetMapping("/pond/count/{baseId}")
	public Result getPondInfo(@PathVariable(name = "baseId", required = true) String baseId);

	/**
	 * 通过基地ID获取基地池塘的养殖情况
	 *
	 * @param baseId
	 * @return
	 */
	@GetMapping("/pond/getInfo/{baseId}")
	public Result getAllPondInfo(@PathVariable(name = "baseId") String baseId);

	/**
	 * 通过基地ID查询基地各种类型种苗的进货量、种苗的库存量、种苗的使用量、水产品产量
	 *
	 * @param baseId
	 * @return
	 */
	@GetMapping("/base/germchit/order/sort/{baseId}")
	public Result getAmountOfVariousGermchit(@PathVariable(name = "baseId") String baseId);


	/**
	 * 查询基地的投入品库存量、使用量、剩余量信息
	 *
	 * @param baseId
	 * @return
	 */
	@GetMapping("/base/supply/amount/{baseId}")
	public Result searchAmountInfoOfBaseSupply(@PathVariable(name = "baseId") String baseId);

	/**
	 * 查询投入品入库的入库数量
	 *
	 * @param baseId
	 * @return
	 */
	@GetMapping("/base/supply/amount/in/{baseId}")
	public Result searchAmountInfoOfBaseSupplyIn(@PathVariable(name = "baseId") String baseId);


	/**
	 * 查询投入品的出库数量
	 *
	 * @param baseId
	 * @return
	 */
	@GetMapping("/base/supply/amount/out/{baseId}")
	public Result searchAmountInfoOfBaseSupplyOut(@PathVariable(name = "baseId") String baseId);
}
